package com.ysd.lis.service.eq.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.ysd.common.Result;
import com.ysd.lis.entity.eq.EqMaintainDetail;
import com.ysd.lis.mapper.eq.EqMaintainDetailMapper;
import com.ysd.lis.request.eq.EqMaintainParam;
import com.ysd.lis.service.eq.EqMaintainDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 设备管理-设备类型 服务实现类
 * </p>
 *
 * @author prs
 * @since 2024-08-05
 */
@Service
public class EqMaintainDetailServiceImpl extends ServiceImpl<EqMaintainDetailMapper, EqMaintainDetail> implements EqMaintainDetailService {

    @Autowired
    EqMaintainDetailMapper eqMaintainDetailMapper;
    @Override
    public Result findMaintainDetailList(EqMaintainParam param) {

        MPJLambdaWrapper<EqMaintainDetail> queryTableWrapper1 = new MPJLambdaWrapper<>();
        queryTableWrapper1.selectAll(EqMaintainDetail.class)
                .eq(EqMaintainDetail::getMaintainId,param.getMaintainId())
                .eq(EqMaintainDetail::getDelFlag,0);
        List<EqMaintainDetail> detailList = eqMaintainDetailMapper.selectList(queryTableWrapper1);
        return Result.succ(1, "查询成功", detailList);

    }
}
